<!-- eslint-disable vue/multi-word-component-names -->
<template>
    <div>
        <div class="swiper" :class="name">
          <div class="swiper-wrapper">
              <slot></slot>
          </div>
        </div>
    </div>
</template>
<script>
import Swiper from 'swiper/bundle'

// import styles bundle
import 'swiper/css/bundle'

export default {
  props: {
    slidesPerView: {
      type: String,
      default: '1'
    },
    name: {
      type: String,
      default: 'actors'
    },
    spaceBetween: {
      type: String,
      default: '0'
    }
  },
  mounted () {
    new Swiper('.' + this.name, {
      slidesPerView: Number(this.slidesPerView),
      spaceBetween: Number(this.spaceBetween),
      pagination: {
        el: '.swiper-pagination',
        clickable: true
      }
    })
  }
}
</script>
